import request from '@/utils/request';
import thesis from "./thesis";
import patent from "./patent";
import home from "./home";
import awards from "./awards";
import treatise from "./treatise";
import copyright from "./copyright";
import extend from "./extend";
import evaluate from "./evaluate";
import other from "./other";
import approve from "./approve";
import gf from "./gf";
import thesisPeriodical from './thesisPeriodical';
import review from "./review";
import collect from "./collect";
import ministry from "./ministry";
import dispatch from "./dispatch";

const cgzh = {
  thesis,
  patent,
  home,
  awards,
  ministry,
  dispatch,
  treatise,
  copyright,
  extend,
  evaluate,
  other,
  approve,
  gf,
  thesisPeriodical,
  review,
  collect,
  getSysServices() {
    return request.get(`/system/sysService/getListByRole`);
  },
  getProjectByServiceCode(params) {
    return request.get(`/cgzh/project/getByServiceId`, {
      params
    });
  },
  benefitListGet(serviceCode, businessId) {
    return request.get(`/cgzh/benefit/getBenefitByCodeAndId`, {
      params: {
        serviceCode: serviceCode,
        businessId: businessId
      }
    });
  },
  benefitAdd(data) {
    return request.post(`/cgzh/benefit/add`, data);
  },
  benefitUpdate(data) {
    return request.post(`/cgzh/benefit/update`, data);
  },
  benefitDel(id) {
    return request.post(`/cgzh/benefit/delete/${id}`);
  },
  benefitGet(id) {
    return request.get(`/cgzh/benefit/detail/${id}`);
  },
  achievementIndex(params) {
    return request.get(`/cgzh/achievementIndex/getAchievements`, {
      params
    });
  }
}
export default cgzh;
